using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsObjectOp : GeneratedMessageLite<SnsObjectOp, SnsObjectOp.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsObjectOp, SnsObjectOp.Builder>
		{
			private bool resultIsReadOnly;
			private SnsObjectOp result;
			protected override SnsObjectOp.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsObjectOp MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsObjectOp DefaultInstanceForType
			{
				get
				{
					return SnsObjectOp.DefaultInstance;
				}
			}
			public ulong Id
			{
				get
				{
					return this.result.Id;
				}
				set
				{
					this.SetId(value);
				}
			}
			public uint OpType
			{
				get
				{
					return this.result.OpType;
				}
				set
				{
					this.SetOpType(value);
				}
			}
			public SKBuiltinBuffer_t Ext
			{
				get
				{
					return this.result.Ext;
				}
				set
				{
					this.SetExt(value);
				}
			}
			public Builder()
			{
				this.result = SnsObjectOp.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsObjectOp cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsObjectOp PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsObjectOp other = this.result;
					this.result = new SnsObjectOp();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsObjectOp.Builder Clear()
			{
				this.result = SnsObjectOp.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsObjectOp.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsObjectOp.Builder(this.result);
				}
				return new SnsObjectOp.Builder().MergeFrom(this.result);
			}
			public override SnsObjectOp BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsObjectOp.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsObjectOp)
				{
					return this.MergeFrom((SnsObjectOp)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsObjectOp.Builder MergeFrom(SnsObjectOp other)
			{
				return this;
			}
			public override SnsObjectOp.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsObjectOp.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsObjectOp._snsObjectOpFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsObjectOp._snsObjectOpFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasId = input.ReadUInt64(ref this.result.id_);
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasOpType = input.ReadUInt32(ref this.result.opType_);
							continue;
						}
						if (num3 == 26u)
						{
							SKBuiltinBuffer_t.Builder builder = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasExt)
							{
								builder.MergeFrom(this.Ext);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.Ext = builder.BuildPartial();
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsObjectOp.Builder SetId(ulong value)
			{
				this.PrepareBuilder();
				this.result.hasId = true;
				this.result.id_ = value;
				return this;
			}
			public SnsObjectOp.Builder ClearId()
			{
				this.PrepareBuilder();
				this.result.hasId = false;
				this.result.id_ = 0uL;
				return this;
			}
			public SnsObjectOp.Builder SetOpType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpType = true;
				this.result.opType_ = value;
				return this;
			}
			public SnsObjectOp.Builder ClearOpType()
			{
				this.PrepareBuilder();
				this.result.hasOpType = false;
				this.result.opType_ = 0u;
				return this;
			}
			public SnsObjectOp.Builder SetExt(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasExt = true;
				this.result.ext_ = value;
				return this;
			}
			public SnsObjectOp.Builder SetExt(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasExt = true;
				this.result.ext_ = builderForValue.Build();
				return this;
			}
			public SnsObjectOp.Builder MergeExt(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasExt && this.result.ext_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.ext_ = SKBuiltinBuffer_t.CreateBuilder(this.result.ext_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.ext_ = value;
				}
				this.result.hasExt = true;
				return this;
			}
			public SnsObjectOp.Builder ClearExt()
			{
				this.PrepareBuilder();
				this.result.hasExt = false;
				this.result.ext_ = null;
				return this;
			}
		}
		public const int IdFieldNumber = 1;
		public const int OpTypeFieldNumber = 2;
		public const int ExtFieldNumber = 3;
		private static readonly SnsObjectOp defaultInstance;
		private static readonly string[] _snsObjectOpFieldNames;
		private static readonly uint[] _snsObjectOpFieldTags;
		private bool hasId;
		private ulong id_;
		private bool hasOpType;
		private uint opType_;
		private bool hasExt;
		private SKBuiltinBuffer_t ext_;
		private int memoizedSerializedSize = -1;
		public static SnsObjectOp DefaultInstance
		{
			get
			{
				return SnsObjectOp.defaultInstance;
			}
		}
		public override SnsObjectOp DefaultInstanceForType
		{
			get
			{
				return SnsObjectOp.DefaultInstance;
			}
		}
		protected override SnsObjectOp ThisMessage
		{
			get
			{
				return this;
			}
		}
		public ulong Id
		{
			get
			{
				return this.id_;
			}
		}
		public uint OpType
		{
			get
			{
				return this.opType_;
			}
		}
		public SKBuiltinBuffer_t Ext
		{
			get
			{
				return this.ext_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasId && this.hasOpType;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasId)
				{
					num += CodedOutputStream.ComputeUInt64Size(1, this.Id);
				}
				if (this.hasOpType)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpType);
				}
				if (this.hasExt)
				{
					num += CodedOutputStream.ComputeMessageSize(3, this.Ext);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsObjectOp()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsObjectOpFieldNames = SnsObjectOp._snsObjectOpFieldNames;
			if (this.hasId)
			{
				output.WriteUInt64(1, snsObjectOpFieldNames[1], this.Id);
			}
			if (this.hasOpType)
			{
				output.WriteUInt32(2, snsObjectOpFieldNames[2], this.OpType);
			}
			if (this.hasExt)
			{
				output.WriteMessage(3, snsObjectOpFieldNames[0], this.Ext);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasId)
			{
				num ^= this.id_.GetHashCode();
			}
			if (this.hasOpType)
			{
				num ^= this.opType_.GetHashCode();
			}
			if (this.hasExt)
			{
				num ^= this.ext_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsObjectOp snsObjectOp = value as SnsObjectOp;
			return snsObjectOp != null && (this.hasId == snsObjectOp.hasId && (!this.hasId || this.id_.Equals(snsObjectOp.id_))) && (this.hasOpType == snsObjectOp.hasOpType && (!this.hasOpType || this.opType_.Equals(snsObjectOp.opType_))) && (this.hasExt == snsObjectOp.hasExt && (!this.hasExt || this.ext_.Equals(snsObjectOp.ext_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsObjectOp, SnsObjectOp.Builder>.PrintField("Id", this.hasId, this.id_, writer);
			GeneratedMessageLite<SnsObjectOp, SnsObjectOp.Builder>.PrintField("OpType", this.hasOpType, this.opType_, writer);
			GeneratedMessageLite<SnsObjectOp, SnsObjectOp.Builder>.PrintField("Ext", this.hasExt, this.ext_, writer);
		}
		public static SnsObjectOp ParseFrom(byte[] data)
		{
			return SnsObjectOp.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsObjectOp MakeReadOnly()
		{
			return this;
		}
		public static SnsObjectOp.Builder CreateBuilder()
		{
			return new SnsObjectOp.Builder();
		}
		public override SnsObjectOp.Builder ToBuilder()
		{
			return SnsObjectOp.CreateBuilder(this);
		}
		public override SnsObjectOp.Builder CreateBuilderForType()
		{
			return new SnsObjectOp.Builder();
		}
		public static SnsObjectOp.Builder CreateBuilder(SnsObjectOp prototype)
		{
			return new SnsObjectOp.Builder(prototype);
		}
		static SnsObjectOp()
		{
			SnsObjectOp.defaultInstance = new SnsObjectOp().MakeReadOnly();
			SnsObjectOp._snsObjectOpFieldNames = new string[]
			{
				"Ext",
				"Id",
				"OpType"
			};
			SnsObjectOp._snsObjectOpFieldTags = new uint[]
			{
				26u,
				8u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.SnsObjectOp.Descriptor, null);
		}
	}
}
